#include "commond.hpp"

int main()
{
    std::cout << "write begin" << std::endl;
    int wfd = open(PIPE_NAME, O_WRONLY);
    assert(wfd > 0);
    std::cout << "write end" << std::endl;
    char buffer[1024];
    while(true)
    {
        std::cout << "client saying: "; 
        fgets(buffer, sizeof(buffer), stdin);
        write(wfd, buffer, strlen(buffer));
    }


    close(wfd);
    return 0;
}